{include file="public/head"}

<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    </ol>
    <!-- Wrapper for slides -->
    <div class="carousel-inner" role="listbox">
        <div class="item active">
            <img src="{$index['img']}/slide1.jpg" alt="...">
        </div>
        <div class="item">
            <img src="{$index['img']}/slide2.jpg" alt="...">
        </div>
    </div>
    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
        <span class="sr-only">Previous</span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
        <span class="sr-only">Next</span>
    </a>
</div>
<div class="main">
    <div class="container">
        <div class="row">
            <div class="main_left col-md-3 hidden-xs">
                <ul class="left_nav">
                    {include file="public/left"}
                </ul>
            </div>
            <div class="main_right col-md-8">
                <div class="news_list">
                    <ul id="list">
                        {volist name="list" id="v"}
                        <li><a href="/news/{$v['id']}.html">{$v['title']|mb_substr=0,15,'utf-8'}</a></li>
                        {/volist}
                    </ul>
                </div>
                <div id="pages">{$page}</div>
            </div>
        </div>
    </div>

</div>
</body>
<style>
    .active_now {
        color: red;
    }

</style>

<script>
    function news(p) {
        $.get("{:url('index/news_append')}", {page: p}, function (data) {
            $('#list').empty();
            $('#pages').empty();
            $('#list').append(data.data);
            $('#pages').append(data.page);
            $('#active_'+p).addClass('active_now');
            $('#active_'+p).siblings().removeClass('active_now');
        })
    }

</script>
</html>

<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
<script src="{$index['js']}/jquery.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script src="{$index['js']}/bootstrap.min.js"></script>